const state = {
	demoName: '这条数据来自 vuex modlue的demo模块'
}

const getters = {
	demoName: (state, getters, rootState, rootGetters) => state.demoName,
}

const mutations = {
	DEMO_CHANGE_NAME: (state, payload = '') => {
		state.demoName = payload
	},
}

const actions = {
	async demoChangeName({
		state,
		commit,
		rootState
	}, payload = '') {
		commit('DEMO_CHANGE_NAME', payload)
	},
}

export default {
	namespaced: true,
	state,
	getters,
	mutations,
	actions
}
